<?php

namespace App\Http\Requests\Api\V1\Frontend\Auth;

use Illuminate\Foundation\Http\FormRequest;

class FastLoginRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'phone' => 'required|string|phone',
            'code'  => 'required|string|code'
        ];
    }

    public function messages()
    {
        return [
            'phone.required' => '手机号缺失',
            'code.required'  => '验证码缺失'
        ];
    }
}
